﻿@model LTM.School.Core.Models.Student

@{
    ViewData["Title"] = "详情页";
}

<h2>详情页</h2>

<div>
    <h4>学生信息</h4>
    <hr />
    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.RealName)
        </dt>
        <dd>
            @Html.DisplayFor(model => model.RealName)
        </dd>
        <dt>
            @Html.DisplayNameFor(model => model.EnrollmentDate)
        </dt>
        <dd>
            @Html.DisplayFor(model => model.EnrollmentDate)
        </dd>
        
        <dt>@Html.DisplayNameFor(a => a.Enrollments)</dt>
        <dd>
            <table class="table">
                <tr>
                    <th>课程列表</th>
                    <th>课程成绩</th>
                </tr>
                
                @foreach (var item in Model.Enrollments)
                {
                    <tr>
                    
                        <td>@Html.DisplayFor(a=>item.Course.Title)</td>
                        <td>@Html.DisplayFor(a=>item.Grade)</td>
                    </tr>
                }

           
                

            </table>
        </dd>

    </dl>
</div>
<div>
    <a asp-action="Edit" asp-route-id="@Model.Id">编辑</a> |
    <a asp-action="Index">返回列表</a>
</div>
